#include <cppunit/config/SourcePrefix.h>
#include "Parser_ModifiesTest.h"
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <stdio.h>
using namespace std;

void
Parser_ModifiesTest::setUp()
{}
void
Parser_ModifiesTest::tearDown()
{}

CPPUNIT_TEST_SUITE_REGISTRATION( Parser_ModifiesTest );

void Parser_ModifiesTest::testParser_Modifies(){
	cout << "Testing : Parser to Modifies" << endl;
	//parse the SIMPLE source code into the parser
	PKB* pkb = new PKB();
	Parser* p = new Parser(pkb);
	string filename = "../Release/alfathiOneTidy.txt";
	p->startParsing(filename); 

	stringstream ss;
	
	/*// verify that ModifiesStmtTable is correct
	for (auto it = pkb->modifies->modifiesTableStmt.begin(); it != pkb->modifies->modifiesTableStmt.end(); ++it) {
		ss << it->first << " : " << it->second << endl;
	}
	cout << "Modifies: " << ss.str() << endl;
	CPPUNIT_ASSERT("1 : 1\n4 : 3\n5 : 6\n6 : 1\n" == ss.str());
	ss.clear();
	ss.str(" ");*/

	cout << "Test OK: Parser to Modifies" << endl;
}